<?php $this->load->view('layout/header'); ?>

<script type="text/javascript">
    //<![CDATA[
    var theForm = document.forms['form1'];
    if (!theForm) {
        theForm = document.form1;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
</script>
<script type="text/javascript">
    //<![CDATA[
    function WebForm_OnSubmit() {
        if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
        return true;
    }
    //]]>
</script>
<form name="form1" method="post" action="<?php echo b_url('user/user_add_action')?>" onsubmit="javascript:return WebForm_OnSubmit();" id="form1">
    <div>
    </div>
    <div id="container">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_form">
            <tr class="table_form_title">
                <td colspan="4">
                    <span id="lblTitle">批量导入 会员</span>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    选择文件：
                </td>
                <td>
                    <input name="upfile" type="text" id="members" />
                    <input type="button" value="上传文件" onclick="upload_file('members');" />
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right">
                    会员级别：
                </td>
                <td>
                    <select name="userrankid">
                        <option value="0">请选择</option>
                        <?php foreach($userrank as $val): ?>
                            <option value="<?php echo $val['userrankid']?>"><?php echo $val['userrankname']?></option>
                        <?php endforeach; ?>
                    </select>
                </td>
            </tr>
            <tr class="table_form_row">
                <td style="width: 15%" align="right"></td>
                <td>
                    第一行为“ 用户名、 密码 、姓名 、性别 、邮件地址 、联系电话 、手机、联系地址 、积分 、备注”，相对应数据务必按此顺序填写，且每一列的数据类型必须相同，为数字就只能为数字。<br/>
                    手机号码等数值在Excel中的设置
                    选上要转换的列，点菜单栏上的“数据”--“分列”--选“分隔符号”（下一步）--下一步--“列数据格式”选“文本”--完成。即可实现转换。
                </td>
            </tr>
            <tr class="table_form_btn">
                <td align="right">
                    &nbsp;
                </td>
                <td>
                    <input type="submit" value="上传" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnSave&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnSave" />
                    <input type="button" value="返回" onclick="javascript:history.go(-1);" />
                    <span id="errMsg" style="color:Red;"></span>
                </td>
            </tr>
        </table>
    </div>
    </body>
    </html>